package com.chinasoft.pojo;

import lombok.Data;

import java.util.List;

@Data
public class PageItem<T>{
    // 总共有多少条
    Long total;
    // 当前页的数据
    List<T> list;

    public PageItem(Long pageNumber, int pageSize, List<T> goodsDisplayList) {
        this.total = pageNumber;
        this.list = goodsDisplayList;
    }

    public PageItem(long total, List<T> brandList) {
        this.total = total;
        this.list = brandList;
    }

    public List<T> getItems() {
        return list;
    }

    public Long getPageNumber() {
        return total;
    }

    public int getPageSize() {
        return list.size();
    }
}
